load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

genrule(
    name = "copy",
    srcs = ["gostyle.proto"],
    outs = ["gostyle.gen.proto"],
    cmd = "sed -e 's/ano.proto/any.proto/' $< > $@",
)

proto_library(
    name = "gostyle_proto",
    srcs = [":copy"],
    visibility = ["//visibility:public"],
    deps = [
        "@com_google_protobuf//:any_proto",
    ],
)

go_proto_library(
    name = "gostyle_go_proto",
    importpath = "github.com/bazelbuild/rules_go/examples/proto/gostyle",
    proto = ":gostyle_proto",
    visibility = ["//visibility:public"],
)
